#pragma once
#include <d3d9.h>
#include <d3dx9.h>
#include "Gets.h"

typedef D3DVECTOR		vec3;
typedef D3DCOLORVALUE	colorVal;

#define LIGHT_SET(x,type) void Set##x(type x){ m_Light.##x = x; }
#define LIGHT_GET(x,type) type Get##x(){ return m_Light.##x; } 
#define LIGHT_GET_SET(x,type) LIGHT_SET(x,type) LIGHT_GET(x,type);
class cLight
{
public:
	cLight();
	cLight(D3DLIGHT9 light);
	LIGHT_GET_SET(Type,D3DLIGHTTYPE);
	LIGHT_GET_SET(Diffuse,D3DCOLORVALUE);
	LIGHT_GET_SET(Specular,D3DCOLORVALUE);
	LIGHT_GET_SET(Ambient,D3DCOLORVALUE);
	LIGHT_GET_SET(Position,vec3);
	LIGHT_GET_SET(Direction,vec3);
	LIGHT_GET_SET(Range,float);
	LIGHT_GET_SET(Falloff,float);
	LIGHT_GET_SET(Attenuation0,float);
	LIGHT_GET_SET(Attenuation1,float);
	LIGHT_GET_SET(Attenuation2,float);
	LIGHT_GET_SET(Theta,float);
	LIGHT_GET_SET(Phi,float);
private:
	D3DLIGHT9 m_Light;
};